﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;


namespace CloudApiServer
{
    public class SystemInfo
    {
        /// <summary>
        /// 版本号
        /// </summary>
        public static string Version { get; set; }
        /// <summary>
        /// 版本时间
        /// </summary>
        public static string Versiontime { get; set; }
        /// <summary>
        /// 本地服务器地址
        /// </summary>
        public static string localurl { get; set; } = $"http://localhost";
        /// <summary>
        /// 本地服务器端口
        /// </summary>
        public static int localurlpost { get; set; } = 9090;
    }
    /// <summary>
    /// 日志删除设置
    /// </summary>
    public class LogDeleteSettings
    {
        /// <summary>
        /// 错误日志删除开关
        /// </summary>
        public static bool ErrorLogDeleteActive { get; set;}
        /// <summary>
        /// 信息日志删除开关
        /// </summary>
        public static bool InfoLogDeleteActive  { get; set;}
        /// <summary>
        /// 信息日志删除时间（天）
        /// </summary>
        public static int InfoLogDeleteDay { get; set;}
        /// <summary>
        /// 错误 日志删除时间（天）
        /// </summary>
        public static int ErrorLogDeleteDay { get; set;}
	    
    }
    

    public class ApiDatainfo 
    {
        /// <summary>
        /// 数据库地址
        /// </summary>
        public static string mysqlUrl { get; set; }
        /// <summary>
        /// 数据库端口
        /// </summary>
        public static string mysqlPost { get; set; }
        /// <summary>
        /// 数据库用户名
        /// </summary>
        public static string mysqlUser { get; set; }
        /// <summary>
        /// 数据库密码
        /// </summary>
        public static string mysqlPwd { get; set; }
        /// <summary>
        /// 数据库名称
        /// </summary>
        public static string mysqlDatabase { get; set; }
        /// <summary>
        /// redis缓存服务地址
        /// </summary>
        public static string redisUrl { get; set; }= "127.0.0.1:6379";
        /// <summary>
        /// redis数据库索引
        /// </summary>
        public static int redisDb { get; set; }=0;
        /// <summary>
        /// 是否启用redis 默认关闭
        /// </summary>
        public static bool stateRedis { get; set; }=false;

        /// <summary>
        /// redis数据过期时间（分钟）
        /// </summary>
        public static int redisExpirationtime { get; set; } = 1440;
    }

    public class FsiEpcTokeninfo 
    {
        /// <summary>
        /// 应用ID
        /// </summary>
        public static string appId { get; set; }
        /// <summary>
        /// 应用密钥
        /// </summary>
        public static string appSecret { get; set; }
        /// <summary>
        /// 定点医药机构私钥
        /// </summary>
        public static string privateKey { get; set; }
        /// <summary>
        /// 处方中心公钥
        /// </summary>
        public static string publicKey { get; set; }
    }

    /// <summary>
    /// 一码付相关token参数
    /// </summary>
    public class FsiCfcTokenInfo
    {
        /// <summary>
        /// 密钥key 暂时
        /// </summary>
        public static string key { get; set; } 
    }


    public class FsiDatainfo 
    {
        /// <summary>
        /// 电子凭证身份证
        /// </summary>
        public static string Ecccodecardno { get; set; }
        /// <summary>
        /// 默认身份证
        /// </summary>
        public static string Defautlcardno { get; set; }
        /// <summary>
        /// 江苏江西医保接口请求默认返回的身份证 为空时根据入参判断，此项配置有值时固定取当前配置的值
        /// </summary>
        public static string JiangsuDefautlcardno { get; set; }
        /// <summary>
        /// 接口启用状态 江苏东软三方
        /// </summary>
        public static bool stateNeusJiangsuApi { get; set; } = true;
        /// <summary>
        /// 接口启用状态 国标医保接口
        /// </summary>
        public static bool stateFsiApi { get; set; }=true;
        /// <summary>
        /// 签到校验状态 
        /// </summary>
        public static bool statesignon { get; set; } = true;    
        /// <summary>
        /// 接口启用状态 国标处方中心
        /// </summary>
        public static bool stateFsiEpcApi { get; set; }= true;
        /// <summary>
        /// 接口启用状态 一码付
        /// </summary>
        public static bool stateFsiCfcApi { get; set; }= true;
        /// <summary>
        /// 接口启用状态 山东滨州三方接口
        /// </summary>
        public static bool stateShandongBinzhouApi { get; set; } = true;
        /// <summary>
        /// 接口启用状态 山东地纬三方接口
        /// </summary>
        public static bool stateShandongDarewayApi { get; set; } = true;
        /// <summary>
        /// 接口启用状态 山东进销存接口
        /// </summary>
        public static bool stateShandongJxcApi { get; set; } = true;
        /// <summary>
        /// 内部接口调用状态是否启用
        /// </summary>
        public static bool stateLocalApiInInternal{ get; set; } = true;


        /// <summary>
        /// 冲正强校验配置（开启后冲正将强校验结算数据是否正常）
        /// </summary>
        public static bool stateRevsMethodDataVerify { get; set; } = false;

        /// <summary>
        /// 药店结算接口，结算接口手动返回报错(结算实际成功但返回失败)
        /// </summary>
        public static bool stateDrugStroeSettleReturnError { get; set; } = false;
        
        /// <summary>
        /// 药店结算接口，数据延迟返回控制开关
        /// </summary>
        public static bool stateDrugStroeSettleDelay { get; set; } = false;
        /// <summary>
        /// 药店预结算接口，数据延迟返回控制开关
        /// </summary>
        public static bool stateDrugStroeSettlePreDelay { get; set; } = false;
        /// <summary>
        /// 药店结算接口，延迟返回时间 说明：这两个接口是用来控制挡板服务接口参数组织完成之后最终返回前置的延迟时间，单位毫秒，用来模拟中心超时但是结算成功，应用测调试
        /// </summary>
        public static int drugStroeSettleDelayTime { get; set; } = 0;
        
        
        /// <summary>
        /// 基金支付总额
        /// </summary>
        public static double fund_pay_sumamt { get; set; } = 0.3;
        /// <summary>
        /// 现金支付总额
        /// </summary>
        public static double psn_cash_pay { get; set; } = 0.4;
        /// <summary>
        /// 账户支付总额
        /// </summary>
        public static double acct_pay { get; set; } = 0.3;
        /// <summary>
        /// 当年账户
        /// </summary>
        public static double clcYearAcctPay { get; set; } = 0.15;
        /// <summary>
        /// 历年账户
        /// </summary>
        public static double crtYearAcctPay { get; set; } = 0.15;
        /// <summary>
        /// 共济账户
        /// </summary>
        public static double acct_mulaid_pay { get; set; } = 0;
        /// <summary>
        /// 医保钱包
        /// </summary>
        public static double medIns_wallet_pay { get; set; } = 0.1;
        
        /*基金支付金额设置*/
        public static double cvlserv_pay { get;set; } = 0;//公务员医疗补助资金(cvlserv_pay)
        public static double hifdm_pay { get; set; } = 0;//伤残人员医疗保障基金支出(hifdm_pay)
        public static double hifmi_pay { get; set; } = 0;//居民大病保险资金支出(hifmi_pay)
        public static double act_pay_dedc { get; set; } = 0;//实际支付起付线(act_pay_dedc)
        public static double hifob_pay { get; set; } = 0;//职工大额医疗费用补助基金支出(hifob_pay)
        public static double oth_pay { get; set; } = 0;//其他支出(oth_pay)
        public static double hifes_pay { get; set; } = 0;//企业补充医疗保险基金支出(hifes_pay)
        public static double fulamt_ownpay_amt { get; set; } = 0;//全自费金额(fulamt_ownpay_amt)
        public static double hosp_part_amt { get; set; } = 0;//医院负担金额(hosp_part_amt)
        public static double inscp_scp_amt { get; set; } = 0;//符合政策范围金额(inscp_scp_amt)
        public static double maf_pay { get; set; } = 0;//医疗救助基金支出(maf_pay)
        public static double overlmt_selfpay { get; set; } = 0;//超限价金额(overlmt_selfpay)
        public static double preselfpay_amt { get; set; } = 0;//先行自付金额(preselfpay_amt)
    }
}
